﻿using System.ComponentModel.DataAnnotations;

namespace Web_swagger.Models
{
    public class CreateUsersRequest
    {
        [Required(ErrorMessage="用户是必填的")]
        [StringLength(20,ErrorMessage ="用户名不能超过{1}个字符")]
        public string username { get; set; }


        [Required]
        [EmailAddress(ErrorMessage ="请输入有效的电子邮件")]
        public string email { get; set; }
        [Range(18,120,ErrorMessage ="年龄必须在{1}到{2}之间")]
        public int age { get; set; }
    }
}
